home *** CD-ROM | disk | FTP | other *** search
- #ifndef _MenuBar_h_
- #define _MenuBar_h_
-
- #include "Blitters.h"
- #include "MenuItem.h"
-
- // location of stuff on screen
- #define kMaxMenuBarItems 10
-
- #define kAppleMenu 0
- #define kProgramList 9
-
- class MenuBar
- {
- public:
- MenuBar( void );
-
- Boolean Init( void );
-
- Boolean HandleMouseClick( Boolean down , point where );
- void HandleMouseMove( point where );
- void UpdateMenuBar( rect *where );
-
- // this is for the menus
- void ClearMenuList( void );
- void AddMenuToList( MenuItem *item );
- void AddAppToList( uchar app );
-
- // used to draw to the menu bar
- void DrawGeneric( OffScreenBuff *srcBuff , rect *srcRect ,
- rect *destRect , rect *crop , ushort options ,
- uchar more , ushort color );
-
- // other stuff
- void HandleSpecialMenuSelect( uchar which , uchar select );
- void SetUpSpecialMenu( MenuItem *appleMenu , MenuItem *appSwitchMenu );
- private:
-
- void DrawAllList( rect *where );
-
- Boolean activeSelect;
- Boolean menuDown;
- uchar which;
-
- MenuItem *menus[ kMaxMenuItems ];
- uchar numMenu; // how many menues are in use
-
- rect menuBarLoc;
-
- OffScreenBuff backGround;
- OffScreenBuff menuBar;
-
- };
-
- extern MenuBar menuBar;
-
-
- #endif